<?php

namespace App\Listeners\Cruise;

use App\Events\Cruise\CruiseOrderChangeEvent;

class CruiseDemoListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param CruiseOrderChangeEvent $event
     * @return void
     */
    public function handle(CruiseOrderChangeEvent $event)
    {
        $oldCruiseOrderModel = $event->oldCruiseOrderModel;
        $newCruiseOrderModel = $event->newCruiseOrderModel;
        $cruiseOrderId       = $event->cruiseOrderId;
        $templateType        = $event->templateType;

        // 创建订单
        if ($oldCruiseOrderModel === null) {

        }

        // 删除订单
        if ($newCruiseOrderModel === null) {

        }
    }
}
